﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////


#pragma once
#include "GcmpModelInterface.h"
#include "IDbObject.h"


namespace gcmp
{
    /// \brief 视图平面类型
    enum class ViewPlaneType : int8_t
    {
        Top = 0,       ///< 顶
        Bottom = 1,    ///< 底
        Cut = 2,      ///< 剖
        Depth = 3     ///< 深
    };

    /// \brief 视图范围
    class GCMP_MODEL_INTERFACE_EXPORT IViewRange : public IDbObject
    {
        DEFINE_CAST_DERIVED(gcmp::IViewRange, gcmp::IDbObject);
    public:
        /// \brief 设置视图平面（顶底剖深）偏移
        ///
        /// \param type 视图平面类型
        /// \param newOffset 基于视图原点，视图方向的偏移
        /// \return 是否设置成功
        virtual bool SetOffset(ViewPlaneType type, double newOffset) = 0;

        /// \brief 获取视图平面（顶底剖深）偏移
        ///
        /// \param type 视图平面类型
        /// \param offset 基于视图原点，视图方向的偏移
        /// \return 是否获取成功
        virtual bool GetOffset(ViewPlaneType type, double& offset) const = 0;

        /// \brief 析构函数
        virtual ~IViewRange();
    };
}
